<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content table-responsive">
                    <div class="row">
                        <div class="col-sm-12">
                            <ul class="nav nav-tabs m-b-lg">
                                <li><h3>{:lang('配置列表')}</h3></li>
                                {empty name="group"}
                                <li class="active"><a >{:lang('全部')}</a></li>
                                {else/}
                                <li><a href="{:url('configList')}">{:lang('全部')}</a></li>
                                {/empty}
                                {volist name='config_group_list' id='vo'}
                                {neq name="group" value="$key"}
                                <li><a  href="{:url('configList',array('group' => $key))}">{$vo}</a></li>
                                {else/}
                                <li class="active"><a >{$vo}</a></li>
                                {/neq}
                                {/volist}
                            </ul>
                        </div>
                    </div>
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <input type="hidden" name="group" value="{$group|default=''}">
                            <div class="col-sm-3 m-b-xs">
                                <lqf_link><a class="btn btn-info ajax-open"  data-url="{:url('config/configAdd')}" data-title="模型添加" ><i class="fa fa-plus"></i> {:lang('add')}</a></lqf_link>
                            </div>
                            <div class="col-sm-9 m-b-xs text-right">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="{:lang('enter keyword search')}" class="form-control">
                                </div>
                                <div class="input-group">
                                    <span class="input-group-btn"> <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> {:lang('search')}</button></span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('config/show_json')}" width="100%">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="120">{:lang('field title')}</th>
                            <th width="100">{:lang('field name')}</th>
                            <th width="120">{:lang('type')}</th>
                            <th width="80">{:lang('grouping')}</th>
                            <th width="100" orderField="by_sort" class="sort-filed"><span>{:lang('sort')}</span></th>
                            <th width="80">{:lang('enable')}</th>
                            <th width="80">{:lang('operate')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="7" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) {
    visible='';
    if(data[i]['visible']=='1') visible='checked';
    %>
    <tr>
        <td><input name="id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['title']%></td>
        <td><%=data[i]['name']%></td>
        <td><%=data[i]['type_text']%></td>
        <td><%=data[i]['group_text']%></td>
        <td><input type="text" name="sort" value="<%=data[i]['sort']%>" class="form-control w50 ajax-sort" data-url="{:url('config/set_sort',array('name'=>'sort'))}" data-id="<%=data[i]['id']%>" size="5"></td>
        <td>
            <input name="visible" class="ajax-checkbox" type="checkbox"   data-url="{:url('config/set_visible',array('name'=>'visible'))}"  data-id="<%=data[i]['id']%>"  <%=visible%> />
        </td>
        <td>
                <lqf_link><a class="ajax-open" data-url="{:url('config/configEdit')}"  data-ids="{'id':'<%=data[i]['id']%>'}" data-title="{:lang('修改')}">{:lang('modify')}</a></lqf_link>
                <lqf_link><a class="ajax-del confirm" data-url="{:url('config/configDel')}" data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('delete')}</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);
    });
</script>